
/*
* 封装公用实体类 用于封装交互
* 2020/01/10 15：25
* zhongwb
* */

//基础数据格式
import 'dart:io';

class BaseModel {
  String name; //名称
  String id;//id
  int index; //索引
  String code;//code值

  BaseModel({this.name, this.id, this.index, this.code});

  @override
  String toString() {
    return 'BaseModel{name: $name, id: $id, index: $index, code: $code}';
  } //code


}

//键值对
class KeyValue{
  String _keyName;
  String _keyVlaue;

  String get keyName => _keyName;

  set keyName(String value) {
    _keyName = value;
  }

  String get keyVlaue => _keyVlaue;

  set keyVlaue(String value) {
    _keyVlaue = value;
  }

  @override
  String toString() {
    return 'KeyValue{_keyName: $_keyName, _keyVlaue: $_keyVlaue}';
  }

}

//图片实体
class PhotoModel{
  String _name;//图片名称
  String _id;//图片id
  String _url;//网络图片地址
  File _file;//本地图片文件地址

  String get name => _name;

  set name(String value) {
    _name = value;
  }

  String get id => _id;

  set id(String value) {
    _id = value;
  }

  String get url => _url;

  set url(String value) {
    _url = value;
  }

  File get file => _file;

  set file(File value) {
    _file = value;
  }

  @override
  String toString() {
    return 'PhotoModel{_name: $_name, _id: $_id, _url: $_url, _file: $_file}';
  }


}


